# -*- coding: utf-8 -*-
# ****************************************************
# Author: yizuoliang
# Create: 2024/6/24
# Last Modified: 2024/6/24
# Last Editor:
# Description:  状态码枚举
# ***************************************************
from enum import Enum


class ResponseCode(Enum):
    # 基础状态码
    SUCCESS = (200, "SUCCESS")
    BAD_REQUEST = (400, "BAD_REQUEST")
    UNAUTHORIZED = (401, "UNAUTHORIZED")
    FORBIDDEN = (403, "FORBIDDEN")
    NOT_FOUND = (404, "NOT_FOUND")
    INTERNAL_SERVER_ERROR = (500, "INTERNAL_SERVER_ERROR")
    # 业务项目
    USER_NO_ENTERED_USERNAME_PASSWORD = (10010, "用户名或密码没有输入")
    USER_NOT_FOUND = (10011, "用户名不存在")
    USER_DISABLED = (10012, "用户名被禁用")

    def __init__(self, code, message):
        self.code = code
        self.message = message
